//
//  BaseNavigationController.swift
//  ParkManage
//
//  Created by cf on 2020/9/21.
//  Copyright © 2020 diligrp. All rights reserved.
//

import UIKit

class BaseNavigationController: UINavigationController, UIGestureRecognizerDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        interactivePopGestureRecognizer?.delegate = self
    }
    
    func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        
        //子控制器个数只剩下一个(这一个就是根控制器),手势不可用
            let open = children.count != 1
            return open
    }
}
